One area of recent advancement is the development of different memory types, each with different characteristics. An important aspect of a majority of electronic devices is the ability to store information in digital memory, which stores information as a series of I/Os. Digital memory is a broad category with many different types of subset memory. One memory type is read-only memory (ROM). ROM is a non-volatile memory type that a system can write to only once. Non-volatile memory can retain information without a constant source of power. The system can read the information stored in the memory, but it cannot re-write new information to the memory. Oftentimes, memory writing takes place during the manufacturing process, thus many times a consumer never writes to ROM memory.
One of the basic memory types created for alleviating these flaws in ROM is Electrically Erasable Programmable Read Only Memory (EEPROM), which is both non-volatile and capable of multiple writes and reads. However, EEPROM is rather expensive to manufacture, thus making it impractical for most personal applications. Flash memory technology is an alternative to EEPROM. In addition to being readable, re-writable (e.g., erased and written to again), and non-volatile, flash memory is relatively cheap to mass-produce. The economic factor makes flash memory much more appropriate for personal applications, such as storing of digital photographs and storing digital music files. Flash memory devices generally have a life span of about one million programming cycles.
Conventionally, software driving the flash memory writes in “chunks” of data optimized to suit the file system in a stack or the flash memory. Typically, the chunks of data are not optimized with respect to the manner in which a user writes data. In the case of the flash block driver, user data can be multiple sectors of data for example a File Allocation Table (FAT) table. In the case of a file system database application, user data can be multiple files that have to be updated or written at the same time.
During a transaction, new data can be written into the flash memory in chunks. However, if the transaction is interrupted (e.g. due to power loss), partial data can be stored onto the flash memory. This can lead to corrupt user data. Furthermore, a write command in the flash memory can consist of up to a maximum of one flash buffer worth of data in contiguous flash memory address range. User data, on the other hand, can be composed of data that may or may not be contiguous in nature. Conventional flash memory systems do not comprehend multiple writes being treated as one write. In the case where the data is not contiguous or the data size is larger than the flash buffer size, or both, it is desired to ensure a series of changes make it through as one transaction and/or in the event of a failure, the partial changes made are rolled back.